<?php
/**
 * @Author: LDF QQ 47121862
 * @Date:   2014-09-14 13:49:03
 * @Last Modified by:   LDF QQ 47121862
 * @Last Modified time: 2014-09-15 01:17:33
 */
sleep(1); //模拟延迟情况
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 0;
$title = isset($_REQUEST['name']) ? $_REQUEST['name'] : 0;
switch ($action) {
	case 1: //操作成功
		$err = 0;
		break;
	case 2: //操作失败
		$err = 1;
		break;
	default: //默认失败
		$err = 1;
		break;
}
$arr = array(
	'title' => $title,
	'err' => $err
);
echo json_encode($arr);
die;